moduleUtils.decorator("$exceptionHandler", function ($delegate, $$CambioConfig) {
    return function (exception, cause) {
        $delegate(exception, cause);

        if ($$CambioConfig.ERROR_TO_DB) {
            var userAgent = window.navigator.userAgent;
            var message = exception.message;
            var stack = exception.stack;
            var bean = {
                stack: stack,
                message: message,
                unitType: userAgent
            };
            $.ajax({
                type: "POST",
                // url: 'http://lms.microbenefits.com.cn/ems-system/restfulEmsMgt/mgtClientErrorInfo',
                url: $$CambioConfig.SZ_MANAGEMENT_SYSTEM_RESOURCE_URL + '/mgtClientErrorInfo',
                contentType: "application/json", //必须有
                dataType: "json", //表示返回值类型，不必须
                data: JSON.stringify(bean),  //相当于 //data: "{'str1':'foovalue', 'str2':'barvalue'}",
                success: function (result) {

                }
            });
        }
    };
});